package com.gopay.gass.domain;


import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.gass.base.common.BaseEntity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by HJY on 2015/3/20.
 */
@Entity
@Table(name = "GASS_ORDER_DTL")
public class GassOrderDtl extends BaseEntity {

    private String gassId;

    private BigDecimal orderAmt;

    private String isUrgent;

    private String isSameBank;

    private String isSameCity;

    private String bcFlag;



    private String recvBankName;

    private String recvBankCode;

    private String recvBankAcctName;

    private String recvBankAcctNum;

    private String recvBankProvinceName;

    private String recvBankProvinceCode;

    private String recvBankCityName;

    private String recvBankCityCode;

    private String recvBankBranchName;

    private String recvBankBranchCode;

    private int vesion;

    private Date createdTs;

    private Date lastUpdTs;


    @Id
    @Column(name = "GASS_ID")
    public String getGassId() {
        return gassId;
    }

    public void setGassId(String gassId) {
        this.gassId = gassId;
    }

    @Column(name = "ORDER_AMT")
    public BigDecimal getOrderAmt() {
        return orderAmt;
    }

    public void setOrderAmt(BigDecimal orderAmt) {
        this.orderAmt = orderAmt;
    }

    @Column(name = "IS_URGENT")
    public String getIsUrgent() {
        return isUrgent;
    }

    public void setIsUrgent(String isUrgent) {
        this.isUrgent = isUrgent;
    }

    @Column(name = "IS_SAME_BANK")
    public String getIsSameBank() {
        return isSameBank;
    }

    public void setIsSameBank(String isSameBank) {
        this.isSameBank = isSameBank;
    }

    @Column(name = "IS_SAME_CITY")
    public String getIsSameCity() {
        return isSameCity;
    }

    public void setIsSameCity(String isSameCity) {
        this.isSameCity = isSameCity;
    }

    @Column(name = "BC_FLAG")
    public String getBcFlag() {
        return bcFlag;
    }

    public void setBcFlag(String bcFlag) {
        this.bcFlag = bcFlag;
    }

    @Column(name = "RECV_BANK_NAME")
    public String getRecvBankName() {
        return recvBankName;
    }

    public void setRecvBankName(String recvBankName) {
        this.recvBankName = recvBankName;
    }

    @Column(name = "RECV_BANK_CODE")
    public String getRecvBankCode() {
        return recvBankCode;
    }

    public void setRecvBankCode(String recvBankCode) {
        this.recvBankCode = recvBankCode;
    }

    @Column(name = "RECV_BANK_ACCT_NAME")
    public String getRecvBankAcctName() {
        /**
    	 * modify by zyt，2017-2-22 在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctName);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctName);
    }

    public void setRecvBankAcctName(String recvBankAcctName) {
        /**
    	 * modified by zyt，2017-2-22  判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctName);
    }

    @Column(name = "RECV_BANK_ACCT_NUM")
    public String getRecvBankAcctNum() {
        /**
    	 * modify by zyt，2017-2-22  在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctNum);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctNum);
    }

    public void setRecvBankAcctNum(String recvBankAcctNum) {
        /**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctNum);
    }

    @Column(name = "RECV_BANK_PROVINCE_NAME")
    public String getRecvBankProvinceName() {
        return recvBankProvinceName;
    }

    public void setRecvBankProvinceName(String recvBankProvinceName) {
        this.recvBankProvinceName = recvBankProvinceName;
    }

    @Column(name = "RECV_BANK_PROVINCE_CODE")
    public String getRecvBankProvinceCode() {
        return recvBankProvinceCode;
    }

    public void setRecvBankProvinceCode(String recvBankProvinceCode) {
        this.recvBankProvinceCode = recvBankProvinceCode;
    }

    @Column(name = "RECV_BANK_CITY_NAME")
    public String getRecvBankCityName() {
        return recvBankCityName;
    }

    public void setRecvBankCityName(String recvBankCityName) {
        this.recvBankCityName = recvBankCityName;
    }

    @Column(name = "RECV_BANK_CITY_CODE")
    public String getRecvBankCityCode() {
        return recvBankCityCode;
    }

    public void setRecvBankCityCode(String recvBankCityCode) {
        this.recvBankCityCode = recvBankCityCode;
    }

    @Column(name = "RECV_BANK_BRANCH_NAME")
    public String getRecvBankBranchName() {
        return recvBankBranchName;
    }

    public void setRecvBankBranchName(String recvBankBranchName) {
        this.recvBankBranchName = recvBankBranchName;
    }

    @Column(name = "RECV_BANK_BRANCH_CODE")
    public String getRecvBankBranchCode() {
        return recvBankBranchCode;
    }

    public void setRecvBankBranchCode(String recvBankBranchCode) {
        this.recvBankBranchCode = recvBankBranchCode;
    }

    @Version
    @Column(name = "VERSION")
    public int getVesion() {
        return vesion;
    }

    public void setVesion(int vesion) {
        this.vesion = vesion;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }
}
